package com.example.smartall.fragment.base;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

/**
 * @author abbas
 * @brief description
 * @date 2022-02-09
 */
abstract class LazyFragment extends BaseFragment {

    private boolean isLazy = true;
    private boolean beforeState = false;
    private boolean state = false;

    @Override
    public void onResume() {
        super.onResume();
        judgeLazyInit();
    }

    /**
      * @brief 刚学完懒加载发现方法弃用了 妙啊
      */
    @Override
    public void setUserVisibleHint(boolean isVisibleToUser) {
        super.setUserVisibleHint(isVisibleToUser);
    }

    @Override
    public void onHiddenChanged(boolean hidden) {
        super.onHiddenChanged(hidden);
    }

    private void judgeLazyInit(){
        if (isLazy && !isHidden()){

        }
    }

    @Override
    public void onDestroy() {
        super.onDestroy();

    }
}

